Quaqua 3.9.5 2007-10-21

ch.randelshofer.quaqua
Class QuaquaTableUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TableUI
          extended by javax.swing.plaf.basic.BasicTableUI
              extended by ch.randelshofer.quaqua.QuaquaTableUI
All Implemented Interfaces:
ViewportPainter

public class QuaquaTableUI
extends javax.swing.plaf.basic.BasicTableUI
implements ViewportPainter

QuaquaTableUI.

Version:
1.4 2007-01-16 Focus border repainting factored out into QuaquaViewportUI.
1.3.3 2007-01-15 Change foreground color of cell renderer even if it is not an UIResource.
1.3.2 2007-01-05 Issue #6: Selection needs to be drawn differently when table hasn't focus or is disabled or is on an inactive window. Issue #10: Table cells mustn't draw selection background when rowSelectionAllowed is false.
1.3.1 2006-05-04 EditorCell was always drawn with alternating row color even when the table style was not set to striped.
1.3 2006-02-07 Support for client property "Table.isFileList" added.
1.2.1 2005-08-25 If the table is not striped, fill the viewport with the background color of the table.
1.2 2005-03-11 LnF Property "Table.alternateBackground" replaced by "Table.alternateBackground.0" and "Table.alternateBackground.1".
1.1 2004-07-04 FocusHandler added.
1.0 June 22, 2004 Created.
Author:
Werner Randelshofer

Nested Class Summary
 class QuaquaTableUI.MouseHandler
          This inner class is marked "public" due to a compiler bug.
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTableUI
javax.swing.plaf.basic.BasicTableUI.KeyHandler, javax.swing.plaf.basic.BasicTableUI.MouseInputHandler
 
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicTableUI
focusListener, keyListener, mouseInputListener, rendererPane, table
 
Constructor Summary
QuaquaTableUI()
          Creates a new instance.
 
Method Summary
protected  java.awt.event.FocusListener createFocusListener()
          Creates the focus listener for handling keyboard navigation in the JTable.
protected  javax.swing.event.MouseInputListener createMouseInputListener()
          Creates the mouse listener for the JTable.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  void installDefaults()
           
protected  void installListeners()
          Attaches listeners to the JTable.
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
          Paint a representation of the table instance that was set in installUI().
 void paintViewport(java.awt.Graphics g, javax.swing.JViewport c)
          Paints the viewport of a JViewport, that contains the component of the user interface delegate.
protected  void uninstallListeners()
           
 
Methods inherited from class javax.swing.plaf.basic.BasicTableUI
createKeyListener, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installUI, uninstallDefaults, uninstallKeyboardActions, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuaquaTableUI

public QuaquaTableUI()
Creates a new instance.

Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installListeners

protected void installListeners()
Attaches listeners to the JTable.

Overrides:
installListeners in class javax.swing.plaf.basic.BasicTableUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class javax.swing.plaf.basic.BasicTableUI

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class javax.swing.plaf.basic.BasicTableUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Paint a representation of the table instance that was set in installUI().

Overrides:
paint in class javax.swing.plaf.basic.BasicTableUI

paintViewport

public void paintViewport(java.awt.Graphics g,
                          javax.swing.JViewport c)
Description copied from interface: ViewportPainter
Paints the viewport of a JViewport, that contains the component of the user interface delegate. This method is invoked by QuaquaViewportUI.

Specified by:
paintViewport in interface ViewportPainter

createMouseInputListener

protected javax.swing.event.MouseInputListener createMouseInputListener()
Creates the mouse listener for the JTable.

Overrides:
createMouseInputListener in class javax.swing.plaf.basic.BasicTableUI

createFocusListener

protected java.awt.event.FocusListener createFocusListener()
Creates the focus listener for handling keyboard navigation in the JTable.

Overrides:
createFocusListener in class javax.swing.plaf.basic.BasicTableUI

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.